import { ACCESS_TOKEN_KEY } from "@/utils/vars"

/**
 * 设置token
 * @param value 
 */
export function setToken(value: string) {
  localStorage.setItem(ACCESS_TOKEN_KEY, value)
}

/**
 * 获取token
 * @returns {string}
 */
export function getToken(): string {
  return localStorage.getItem(ACCESS_TOKEN_KEY) || ''
}

/**
 * 删除token
 */
export function removeToken() {
  localStorage.removeItem(ACCESS_TOKEN_KEY)
}
